<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:sec="http://www.springframework.org/security/tags"
	xmlns:p="http://primefaces.org/ui">

	<h:form id="form_collection_detail">
		<div class="row-fluid">
			<div class="span7">
				<p class="lead">
					<h:outputText 
						value="#{C_COLLECTION.newCollection ? 'Création d\'une collection' : 'Modification de la collection '.concat(C_COLLECTION.name)}" />
				</p>
				<div class="control-group">
					<label class="control-label" for="input_name">Nom</label>
					<div class="controls">
						<h:inputText value="#{C_COLLECTION.name}" id="input_name"
							name="input_name" placeholder="Nom" required="true"
							requiredMessage="Ce champs est requis" styleClass="input-xlarge" />
						<p:message id="message_name" for="input_name" />
					</div>
					<br /> <label class="control-label" for="input_comment">Commentaire</label>
					<div class="controls">
						<h:inputText value="#{C_COLLECTION.comment}" id="input_comment"
							name="input_comment" placeholder="Commentaire" required="true"
							requiredMessage="Ce champs est requis" styleClass="input-xxlarge" />
						<p:message id="message_comment" for="input_comment" />
					</div>
				</div>
				<div class="control-group">
					<div class="controls">
						<h:commandButton styleClass="btn btn-primary"
							value="#{C_COLLECTION.newCollection ? 'Créer la collection' : 'Modifier la collection'}"
							action="#{C_COLLECTION.save}" />
						<h:commandButton immediate="true" styleClass="btn" style="margin-left: 5px;" value="Annuler">
							<f:setPropertyActionListener
								target="#{C_COLLECTION.displayDetail}" value="false"></f:setPropertyActionListener>
						</h:commandButton>
					</div>
				</div>
			</div>
		</div>
	</h:form>

</ui:composition>
